<template>
	<view>
		<!-- 校系新闻 begin -->
		<scenery v-if="PageCur=='scenery'" id='scenery'></scenery>
		<!-- 校友风采 begin -->
		<nearby v-if="PageCur=='nearby'" id='nearby'></nearby>
		<!-- 礼品 begin -->
		<goods v-if="PageCur=='goods'" id='goods'></goods>
		<!-- 信息 begin -->
		<msg v-if="PageCur=='msg'" id='msg'></msg>
		<!-- 我的 begin -->
		<my v-if="PageCur=='my'" id='my'></my>		
		
		<view v-if="isInit">
			<!-- 菜单部分 begin -->
			<view class="cu-bar tabbar bg-white shadow foot">
				<view class="action" :class="PageCur=='scenery'?'text-blue':'text-gray'" @click="NavChange" data-cur="scenery">
						<view class='cuIcon-cu-image'>
							<text class="cuIcon-pic"></text>				
						</view>
						景点
				</view>
				<view class="action" :class="PageCur=='nearby'?'text-blue':'text-gray'" @click="NavChange" data-cur="nearby">
						<view class='cuIcon-cu-image'>
							<text class="cuIcon-location"></text>				
						</view>
						附近
				</view>
				<view class="action add-action text-gray">
					<button class="cu-btn cuIcon-question bg-blue shadow" @tap="navigateTo({url:'/pages/my/message/chat'})"></button>
					小助理
				</view>
				<view class="action" :class="PageCur=='goods'?'text-blue':'text-gray'" @click="NavChange" data-cur="goods">
						<view class='cuIcon-cu-image'>
							<text class="cuIcon-goodsfavor"></text>				
						</view>
						特产
				</view>
				<view class="action" :class="PageCur=='my'?'text-blue':'text-gray'" @click="NavChange" data-cur="my">
						<view class='cuIcon-cu-image'>
							<view class="cuIcon-my"></view>				
						</view>
						我的
				</view>
			</view>
		</view>
		<!-- 菜单部分 end -->		
	</view>
	
</template>

<script>	
	export default {
		data() {
			return {
				PageCur: 'scenery',
				isInit:true
			}
		},
		onLoad(option) {
			if(option.cur){
				this.PageCur=option.cur
			}
		},
		methods: {
			NavChange: function(e) {
				if(this.PageCur!=e.currentTarget.dataset.cur){
					this.PageCur = e.currentTarget.dataset.cur
				}
			},
		}
	}
</script>

<style scoped>
	.text-blue{
		color:#44a1c8;
	}
</style>